<div class="mainbox">
    {{#each bus.achs_detail}}
    <userorder></userorder>
    {{/each}}
    <sbutton shadownum1="0 0 10px 1px" shadownum2="0 0 6px 0" class='btn' text="{{#if isloading}}正在加载{{#else}}{{ismore&&'没有了哦'||'点击查看更多'}}{{/if}}" disabled="{{ismore&&'disabled'}}" event-click="{{'$Event.get_more_order'}}"></sbutton>
</div>

<xmp type="tag" name="userorder">
    <div class="orderitem">
        <div class="orderinfo">
            <div class="item">
                订单：{{_id+" ("+info.user.info.name}})
            </div>
            <div class="item">
                下单时间：{{#Time create_time,"YYYY-MM-DD HH:mm:ss"}}
            </div>
            <div class="item" style="white-space: normal;">
                地址：{{info.user_address.name}},{{#if info.user_address.mobilenumber}} {{info.user_address.mobilenumber}} {{info.user_address.phonenumber&&"/"+info.user_address.phonenumber}} {{#else}} {{info.user_address.phonenumber}} {{/if}}, {{info.user_address.town}},{{info.user_address.county}}，{{info.user_address.detail}}
            </div>
            <div class="item">
                总花费额：{{cash+" 状态："}}
                <!-- 在线付款 -->
                <!-- 未付款 -->
                {{#if info.state==$Top.config.ACH_STATE.ol未付款}} 等待付款 {{/if}}
                <!-- 已付款 -->
                {{#if info.state==$Top.config.ACH_STATE.ol未发货}} <a class="method" href="default/express?id={{_id}}">去发货</a> {{/if}}
                <!-- 运货中 -->
                {{#if info.state==$Top.config.ACH_STATE.ol未收货}} <a class="method">确认收款</a>
                {{/if}}
                <!-- 确认收货 -->
                {{#if info.state==$Top.config.ACH_STATE.ol交易完成}} 交易完成
                <!-- <a class='method'>评价</a> -->
                {{/if}}
                <!-- 货到付款 -->
                <!-- 未发货 -->
                {{#if info.state==$Top.config.ACH_STATE.未发货}} <a class="method" href="#default/express?id={{_id}}">去发货</a> {{/if}}
                <!-- 运货中 -->
                {{#if info.state==$Top.config.ACH_STATE.已发货}}
                <a class="method" href="#default/express?id={{_id}}&num={{info.express_info.num}}&com={{info.express_info.company}}">查看物流</a>
                {{/if}}
                <!-- 确认收获并付款 -->
                {{#if info.state==$Top.config.ACH_STATE.未收货未付款}} <a class="method" event-click="{{'$Top.$Event.setorder_success'}}">确认收款</a> {{/if}}
                <!-- 未评价2 -->
                {{#if info.state==$Top.config.ACH_STATE.交易完成}}交易完成
                {{/if}}
            </div>
        </div>
        <div class="ordergoods">
            {{#each info.goods_info}}
            <div class="item">
                <div class="img">
                    <a href="{{#if $Caller.info.state==$Top.config.achs_status.weipingjia2}}#default/comments{{#else}}{{#if $Caller.info.state==$Top.config.achs_status.weipingjia}}#default/comments{{#else}}mobile.main.html#default/goods_details{{/if}}{{/if}}?id={{goods._id}}">
                        <img src="{{goods.preview_img_url}}?imageView/1/w/40/h/40">
                    </a>
                </div>
                <div class="info">
                    <div>
                        {{goods.goods_name}}
                    </div>
                    <div>
                        单价：{{goods.cash+"　　"}} 数量：{{num}}
                    </div>
                </div>
            </div>
            {{/each}}
        </div>
    </div>
</xmp>
